﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;

namespace Xiaov.SmartWeb.Application.TZGC
{
    public partial class TreeZjybjh : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string sql = "select jh from zjyb_zjyb00";
                DataSet ds = Maticsoft.DBUtility.DbHelperOra.Query(sql);
                Response.ContentType = "text/xml";
                Response.ContentEncoding = Encoding.Default;
                Response.CacheControl = "no-cache";
                StringBuilder sbStr = new StringBuilder();
                sbStr.Append("<?xml version='1.0' encoding='utf-8'?>");
                sbStr.Append(@"<TreeList><Properties headerHeight='0'></Properties><cols>                   
                    <Col name='jh' width='100'></Col> </Cols><Table>");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        sbStr.Append("<TR><TD>");
                        sbStr.Append(dr["jh"]);
                        sbStr.Append("</TD></TR>");
                    }
                }
                sbStr.Append("</Table></TreeList>");
                Response.Write(sbStr.ToString());
                Response.End();
            }
        }
    }
}